import { ref } from 'vue'
import ScGuess from '@/components/ScGuess.vue'

export const useGuessList = () => {
  // 设置子组件的实例
  const guessRef = ref<InstanceType<typeof ScGuess>>()
  // 滚动触底事件
  const onScrollToLower = () => {
    const res = guessRef.value?.getMore()
  }
  // 返回给外部组件使用
  return {
    guessRef,
    onScrollToLower,
  }
}
